package com.bsoft.gol.hcs.enumcase;


/**
 * @Description: 就诊类型
 * @Author: tongtp
 * @Date: 2020/9/4 10:18
 **/
public enum VisitRecordEnum {

	//	业务类型：1:门诊、2:住院、3:手术、4:检验、5:检查、6:取药、7:治疗记录 8:体检就诊记录
	OUTPATIENT_VISIT_RECORD((byte)1, "门诊就诊记录"),
	INPATIENT_VISIT_RECORD((byte)2, "住院就诊记录"),
	SURGICAL_RECORD((byte)3, "手术记录"),
	INSPECTION_RECORD((byte)4, "检验申请记录"),
	CHECK_RECORD((byte)5, "检查申请记录"),
	DISPENSING_RECORD((byte)6, "取药记录/发药记录"),
	TREATMENT_RECORD((byte)7, "治疗记录/处置记录"),
	PHYSICAL_EXAMINATION_RECORDS((byte)8,"体检就诊记录");

	private final Byte type;

	private final String text;

	VisitRecordEnum(Byte type, String text) {
		this.type = type;
		this.text = text;
	}

	public static VisitRecordEnum getEnumByKey(String type) {
		for (VisitRecordEnum temp : VisitRecordEnum.values()) {
			if (temp.getType().equals(Byte.valueOf(type))) {
				return temp;
			}
		}
		return null;
	}

	public static VisitRecordEnum getEnumByKey(Byte type) {
		for (VisitRecordEnum temp : VisitRecordEnum.values()) {
			if (temp.getType().equals(type)) {
				return temp;
			}
		}
		return null;
	}

	public Byte getType() {
		return type;
	}

	public String getText() {
		return text;
	}
}
